//
//  WYRNavController.m
//  彩票项目
//
//  Created by 伍银荣 on 2021/7/24.
//  Copyright © 2021 com.WYR. All rights reserved.
//

#import "WYRNavController.h"

@interface WYRNavController ()

@end

@implementation WYRNavController

+(void)initialize {
    UINavigationBar *navBar = [UINavigationBar appearance];
    //设置导航条背景颜色
    //
    navBar.barTintColor = [UIColor redColor];
    //取消透明效果
    navBar.translucent = NO;
    //设置导航条上的字体
    [navBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName: [UIFont boldSystemFontOfSize:18]}];
    [navBar setTintColor:[UIColor whiteColor]];
}

//拦截push
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    
//    //判断进来的界面是否为第一个
//    if (self.viewControllers.count > 0) {
//    }
    //使用导航栏跳转的界面跳转到别的界面都是隐藏标签栏
    viewController.hidesBottomBarWhenPushed = YES;
    
    //要在前面的操作做完之后调用父类的方法
    [super pushViewController:viewController animated:animated];
}

//设置状态栏的样式
-(UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
